#@adminLayout()

#define main()
<div class="jfa-header-box" id="jfa-header-box">
	<div class="jfa-crumbs" id="jfa-crumbs">
		词语管理
	</div>
	<div class="jfa-search-box">
		<form action="/admin/word/search">
			### <input class="jfa-search" type="text" name="keyword" placeholder="搜索" >
		</form>
	</div>
	#include("/_view/_admin/common/_header_right.html")
</div>

### 内容区域
<div class="jfa-content-box" id="jfa-content-box">
	<div class="jfa-content" id="jfa-content">

		<div class="jfa-toolbar">
			<a class="btn btn-primary btn-sm" href="/admin/word/add">
				<i class="fa fa-plus"></i>
				创建词语
			</a>
		</div>

		<div class="jfa-table-box margin-top-30">
			<table class="table table-bordered table-hover margin-bottom-10">
				<thead>
				<tr>
					<th>词语名称</th>
					<th>创建时间</th>
					<th>操作</th>
				</tr>
				</thead>
				<tbody>
				#for(x : wordPage.getList() )
				  <tr>
					 <th scope="row">#(x.name)</th>
					 <td>#date(x.createAt)</td>
					
					 <td class="jfa-operation-button">

						 <a data-delete
						    data-title="#(x.name)"
						    data-action="/admin/word/delete?name=#(x.name)">
							 <i class="fa fa-trash" title="删除"></i>
						 </a>
					 </td>
				 </tr>
				#end
				</tbody>
			</table>

			<div>
				#@adminPaginate(wordPage.pageNumber, wordPage.totalPage, "/admin/word?p=")
			</div>
		</div>
	</div><!-- END OF jfa-content -->
</div><!-- END OF jfa-content-box -->

<style type="text/css">
</style>
<script type="text/javascript">
	$(document).ready(function() {
		initMagicInput(prepareAction);
	});

	function prepareAction($this, state) {
		return {
			url: state ? "/admin/word/lock" : "/admin/word/unlock",
			data : {
				id: $this.attr("data-id")
			}
		}
	}
</script>
#end



